package com.wecheir.service;


import com.wecheir.entity.Farm;
import com.wecheir.entity.FarmData;
import com.wecheir.entity.Role;

import java.util.Date;
import java.util.List;

public interface FarmService  {
    long getFarmNameCount(String name);
    Farm saveFarm(Farm farm);

    Farm getFarmById(int id);

    void updateFarm(Farm farm);

    void deleteFarm(int id);
//    void addFarm(Farm farm);
    List<Farm> selectAll();

    List<Farm> getFarmByUserId(String userId);

    List<Farm> getFarmByUser(String id, int start, int limit);

    public List<FarmData> getFarmData(String farm_id, Date beginDate, Date endDate);

    boolean updateImg(int id, String url);


}
